package com.yuanluludev.lib_pic.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuanluludev.imageloader.glide.GlideManager
import com.yuanluludev.lib_pic.R

/**
 * yuanLuLu
 * 网络图片 适配器
 */
class NetImageAdapter(data: MutableList<String>, var itemHeight: Int) :
    BaseQuickAdapter<String, BaseViewHolder>(R.layout.gv_net_image, data) {

    override fun convert(holder: BaseViewHolder, item: String) {

        val ivImage = holder.getView<ImageView>(R.id.fiv).apply {
            layoutParams.height = itemHeight
        }

        GlideManager.load(context,item,ivImage)

    }

}